package com.java.learning.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;

import javax.validation.constraints.NotBlank;

@Data
@AllArgsConstructor
public class Student {

    @TableId(type = IdType.ID_WORKER)
    private Integer id;
    @NonNull
    @NotBlank( message = "学号不能为空！")
    private String stuNo;
    @NotBlank(message = "学生名字不能为空！")
    private String name;
    private String address;
    private String email;
    public Student(){}
}
